<!DOCTYPE html>
<html  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width" />
    <meta name="author" content="www.lzqcode.com" />
    <meta name="robots" content="all" />
    <title>日记</title>
    <link rel="stylesheet" th:href="@{/font-awesome/css/font-awesome.min.css}">
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}" />
    <link rel="stylesheet" th:href="@{/css/master.css}" />
    <link rel="stylesheet" th:href="@{/css/gloable.css}" />
    <link rel="stylesheet" th:href="@{/css/nprogress.css}" />
    <link rel="stylesheet" th:href="@{/css/timeline.css}" />
    <link rel="shortcut icon" href="https://pandao.github.io/editor.md/favicon.ico" type="image/x-icon" />
</head>
<body>
<div class="header">
</div>
<header class="gird-header">
    <div class="header-fixed">
        <div class="header-inner">
            <a href="javascript:void(0)" class="header-logo" id="logo">Mr.liu</a>
            <nav class="nav" id="nav">
                <ul>
                    <li><a th:href="@{/index}">首页</a></li>
                    <li><a th:href="@{/admin/blogs}">博客管理</a></li>
                    <li><a th:href="@{/markdown/edit}">写文章</a></li>
                </ul>
            </nav>
            <a th:href="@{/admin/logout}" class="blog-user"  onclick="return confirm('确定要注销吗')">
                <i class="fa fa-qq"></i>
            </a>
            <a class="phone-menu">
                <i></i>
                <i></i>
                <i></i>
            </a>
        </div>
    </div>
</header>

<div class="doc-container" id="doc-container">
    <div class="container-fixed">
        <div class="timeline-box shadow">
            <div class="timeline-main">

                <div class="layui-form">
                    <table class="layui-table" id="test">
                        <colgroup>
                            <col width="150">
                            <col width="150">
                            <col>
                        </colgroup>
                        <thead>
                        <tr>
                            <th>文章名称</th>
                            <th>作者</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr th:each="article : ${articles}">
                            <td th:text="${article.title}">贤心</td>
                            <td th:text="${article.author}">汉族</td>
                            <td>
                                <a href="#" th:href="@{/blog/{id}(id=${article.id})}" class="layui-btn">
                                    <i class="ui edit icon"></i>
                                    编辑
                                </a>
                                <a href="#" th:href="@{/article/delete/{id}(id=${article.id})}" onclick="return confirm('确定要删除该吗？三思啊! 删了可就没了！')" class="layui-btn layui-btn-danger">
                                    <i class="ui trash alternate icon"></i>
                                    删除
                                </a>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

<!--<table class="layui-hide" id="test"></table>-->

<footer class="grid-footer">
    <div class="footer-fixed">
        <div class="copyright">
            <div class="info">
                <div class="contact">
                    <a href="javascript:void(0)" class="github" target="_blank"><i class="fa fa-github"></i></a>
                    <a href="#" class="qq" target="_blank" ><i class="fa fa-qq"></i></a>
                    <a href="#" class="email" target="_blank" ><i class="fa fa-envelope"></i></a>
                    <a href="javascript:void(0)" class="weixin"><i class="fa fa-weixin"></i></a>
                </div>
                <p class="mt05">
                    Copyright &copy; 2019-2020 ZQ博客 All Rights Reserved V.3.1.3 Power by ZQ博客
                </p>
            </div>
        </div>
    </div>
</footer>


<script>
    layui.use('table', function(){
        var table = layui.table;

        table.render({
            elem: '#test'
            ,page: true
        });
    });
</script>

<script th:src="@{/layui/layui.js}"></script>
<script th:src="@{/js/yss/gloable.js}"></script>
<script th:src="@{/js/plugins/nprogress.js}"></script>
<script>NProgress.start();</script>
<script th:src="@{/js/pagediary.js}"></script>
<script>
    window.onload = function () {
        NProgress.done();
    };
</script>
</body>
</html>
